differentiation Gradient of a curve